package gomap

import (
	"fmt"

	"gitee.com/xslasd/go-map/ls"
	"gitee.com/xslasd/go-map/ls/amap"
	"gitee.com/xslasd/go-map/ls/baidu"
)

func NewMapSDK(ak string, mode int) (ls.Locator, error) {
	switch mode {
	case 0:
		return baidu.DefaultBaiduMapSDK(ak), nil
	case 1:
		return amap.DefaultAMapSDK(ak), nil
	default:
		return nil, fmt.Errorf("wrong mode")
	}
}
